There are a significant number of wireless technologies in the marketplace today. The emerging standard for short range wireless technology is called Bluetooth. Bluetooth is a Radio Frequency (RF) specification for short-range, point-to-multipoint voice and data transfer. Bluetooth can transmit through solid, non-metal objects and its nominal link range is from 10 cm to 10 m, but can be extended to 100 m by increasing the transmit power. It is based on a low-cost, short-range radio link, and facilitates ad hoc connections for stationary and mobile communication environments. The Bluetooth wireless technology allows users to make connections between communication devices such as mobile phones and desktop and notebook computers. Finding and making use of services in these environments is becoming increasingly important due to the continued growth in wireless technologies as seen by the proliferation of mobile computing devices and also to the merging of wireless technologies and computer technologies. These services can include basic services such as printing, faxing, paging, etc., more complex services such as video conferencing and teleconferencing, and any other type of service that a service provider may provide. Bluetooth utilizes a Service Discovery Protocol to allow communication devices to find and make use of these services.
A service discovery stream consists of a linear stream of data that has data structures encoded within it to represent an available service on an enabled device. There are eight types of data encoded within a service discovery stream. These types are nil (null type), unsigned integer, signed twos-complement integer, universally unique identifier (UUID), text string, Boolean, data element sequence, data element alternative, and uniform resource locater (URL). A data element sequence is a data element whose data field is a sequence of data elements. A data element alternative is a data element whose data field is a sequence of data elements from which one data element is to be selected.
Each element in the service discovery stream has a size attribute which describes the byte size of its content. A sequence or alternative element may have children elements within it. Since the terminating elements are embedded in the outer elements, the service discovery stream must be constructed from the bottom up.
There are several issues that arise with service discovery streams. Creating a well formed service discovery stream is not straightforward. Traversing a service discovery stream in a simple manner is not easy because a large amount of descriptive data must be maintained due to the embedded data structures contained in the service discovery stream. These embedded data structures may also have structures embedded in them ad infinitum. Additionally, modifying a service discovery stream can be complex and introduce errors. The modification, whether it be adding, changing, or removing a data structure, may alter bytes before, after, and at the point of modification, thereby increasing the likelihood of error. What is needed is a way to represent a service discovery stream that reduces the complexity of traversing the stream and that makes modifications to the stream easier to implement.